New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small amendments for Hash#merge with IndifferentAccess #525
Small amendments for Hash#merge with IndifferentAccess #525
Conversation
Here's an example of a CHANGELOG.md entry: * [#525](https://github.com/hashie/hashie/pull/525): Small amendments for hash#merge with indifferentaccess - [@yogeshjain999](https://github.com/yogeshjain999). Generated by 馃毇 Danger |
How did you find this? I think the first one should be testable, since if you override any of these methods in the included class merge would miss them, no? |
b025025
to
747c9cb
Compare
@dblock Right. How about the spec I've added ? |
1. Use `indifferent_writer` in `convert!` so that when `indifferent_writer`, `convert_key` or `indifferent_value` is overridden in included class, `merge` can use those. 2. `convert!` was calling twice if `other` hash was lacking indifference. `IndifferentAccess.inject!` already does conversion.
747c9cb
to
b206fb8
Compare
Love the use of grumpy and indifferent cat. Merging. |
Now that I think about this I think there was a changelog line here, "Use |
Ah right 馃槃 |
PR it. Let's at least ack your work in CHANGELOG! |
Small amendments for Hash#merge with IndifferentAccess
Use
indifferent_writer
inconvert!
so that whenindifferent_writer
,convert_key
orindifferent_value
isoverridden in included class,
merge
can use those.convert!
was calling twice ifother
hash was lackingindifference.
IndifferentAccess.inject!
already does conversion.I've not written specs because both changes doesn't seem to be either fix or feature. But let me know if needed. 馃